using System.Security.Permissions;
using System.Windows.Forms;

namespace Packet_AC_A
{
    /// <summary>
    /// Summary description for ShortcutsControl.
    /// </summary>
    public partial class ShortcutsControl : UserControl
    {
        public ShortcutsControl()
        {
            InitializeComponent();
        }

        /// <summary>
        /// Let this control process the mnemonics.
        /// </summary>
        [UIPermission(SecurityAction.LinkDemand, Window = UIPermissionWindow.AllWindows)]
        protected override bool ProcessDialogChar(char charCode)
        {
            // If we're the top-level form or control, we need to do the mnemonic handling
            if (charCode != ' ' && ProcessMnemonic(charCode))
            {
                return true;
            }
            return base.ProcessDialogChar(charCode);
        }

        /// <summary>
        /// Enable the IME status handling for this control.
        /// </summary>
        protected override bool CanEnableIme
        {
            get
            {
                return true;
            }
        }

        private void button1_Click(object sender, System.EventArgs e)
        {
            Form IsForm = new PHelp.frmStringFormating();
            IsForm.ShowDialog();

            // EnvDTE.DTE app = (EnvDTE.DTE)GetService(typeof(SDTE));

            // EnvDTE.ToolBox
        }

        private void button2_Click(object sender, System.EventArgs e)
        {
            Form IsForm = new PHelp.frmWebsites();
            IsForm.ShowDialog();
        }

        private void btnINIEditor_Click(object sender, System.EventArgs e)
        {
            Form IsForm = new PHelp.frmINIEditor();
            IsForm.ShowDialog();
        }

        private void button3_Click(object sender, System.EventArgs e)
        {
            System.Diagnostics.Process.Start("https://kodingen.com/");
        }

        private void button4_Click(object sender, System.EventArgs e)
        {
            try
            {                
                BaseProject.Form1 Test = new BaseProject.Form1(Aaron1.Utilities.Package);

                Test.ShowDialog();
            }
            catch (System.Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
    }
}